<?

/**
* fetch id of currency based on CRR_SYMBOL
*
* @param  string    $COracle
* @param  string    $idCurrency
* @param  string    $nmCurrency
* @param  string    $srcDb
*
*/
function initBaseCurrency(&$COracle,
                          &$srcDb,
                          &$idCurrency,
                          &$nmCurrency){

  $values = "  ".$idCurrency.", 
              '".$nmCurrency."' ";
              
  $query  = "UPDATE ".$srcDb." ".
            "SET CRR_ID     = ".$idCurrency."   ,
                 CRR_SYMBOL ='".$nmCurrency."'  ";
            
  $COracle->execQuery($query);
}     

/**
* Init the base method
*
* @param  string    $COracle
* @param  string    $srcDb
* @param  string    $method
*
*/
function initMethod(&$COracle,
                    &$srcDb,
                    &$method){
  
  $query  = "UPDATE ".$srcDb." ".
            "SET STATUS='"._NOT_ACTIVE."' ";
  
  $COracle->execQuery($query);
            
  $query  = "UPDATE ".$srcDb." ".
            "SET STATUS='"._ACTIVE."' ".
            "WHERE  METHOD_NAME='".$method."' ";
            
  $COracle->execQuery($query);
}
?>